import { http } from "@/utils/http";

const baseUrl = "http://10.8.58.1:8400/sparkData/query";
const params = {
  dataType: {
    path: "kt5/data_type_code"
  },
  deviceId: {
    path: "kt5/device_id_code"
  },
  edgeGateway: {
    path: "kt5/edge_gateway_code"
  },
  scene: {
    path: "kt5/scene_code"
  }
};

// 从云端下载标识配置映射表
export const getSDID = name => {
  console.log(params[name]);
  return http.request("post", baseUrl, { data: params[name] });
};

// 从云端拉取推送日志信息
export const getLogInfos = data => {
  return http.request("post", baseUrl, { data });
};
